
package com.feib.soeasy.service;

import org.springframework.transaction.annotation.Transactional;

import com.feib.soeasy.model.Group;
import com.feib.soeasy.pagination.PaginatedList;


/**
 * @title (#)GroupService.java<br>
 * @description 帳單業者基本資料邏輯介面<br>
 * @author Jimmy Liu<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2010/11/19 create by Jimmy Liu<br>
 */
@Transactional(readOnly = true)
public interface GroupService {
    
    public Group queryByPk(Long groupPk);

    /**
     * 依據查詢物件查詢帳單業者
     * @param payment 查詢條件
     * @param paginationConfig 換頁、排序條件
     * @return 查詢結果物件
     */
    public PaginatedList<Group> queryByGroup(Group group, PaginatedList<Group> paginationConfig);

    /**
     * 依據業者代號(unique key)取得帳單業者物件
     * @param groupNo 業者代號
     * @return 帳單業者物件
     */
    public Group findByExactGroupNo(String groupNo);

    /**
     * 依據查詢物件查詢帳單業者,排除銀行端資料
     * @param group 查詢條件
     * @param paginationConfig 換頁、排序條件
     * @return 查詢結果物件
     */
    public PaginatedList<Group> queryByGroupExcludeBank(Group group, PaginatedList<Group> paginationConfig);

    /**
     * 依據查詢物件查詢帳單業者
     * @param group 查詢條件
     * @param accountNo 實體帳號
     * @param paginationConfig 換頁、排序條件
     * @return 查詢結果物件
     */
    public PaginatedList<Group> queryPaginationByGroupvirtualAccountNo(Group group, String accountNo, PaginatedList<Group> paginationConfig);

    /**
     * @param groupNo
     * @return
     */
    public boolean isDuplicateGroupNo(String groupNo);

    /**
     * @param groupInDb
     */
    @Transactional(readOnly = false)
    public Group save(Group group);

    /**
     * @param editGroup
     */
    @Transactional(readOnly = false)
    public void deleteGroup(Group group);

    /**
     * 新增一個帳單業者
     * 同時會新增帳單業者的 管理帳號與全權限等
     * @param group
     * @return
     */
    @Transactional(readOnly = false)
    public Group addGroup(Group group);

    @Transactional(readOnly = false)
	public void updateAmount(Group group);
    
    @Transactional(readOnly = false)
	public void updateLevel(Group group);
}
